home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
n_b_v203.zip
/
VAL2WRDS.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
2KB
|
51 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME VAL2WRDS.DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
$INCLUDE "DAS-NB01.INC"
COLOR 7,0
CLS
? "┌───────────────────────────────────────────────────────────────────────
? "│ fValue2Words$ ( Number# )
? "├────────────────────────────────────────────────────────────────────────
? "│ Convert numbers into words for check printing, etc.
? "│
? "│ As the routine stands now it will return 2 places past the decimal. If
? "│ you are working in a country that requires something different than the
? "│ N.American style then the code can quickly be modified.
? "└──────────────────────────────────────────────────────────────────────────
?
Number# = 1234.50
PRINT USING "Our number is: ##,###,###,###.##"; Number#
PRINT
D$ = fValue2Words$( Number# )
PRINT "AMERICAN: "; D$
PRINT
REPLACE "DOLLARS" WITH "POUNDS" IN D$
REPLACE " CENTS" WITH "p" IN D$
PRINT " ENGLISH: "; D$
PRINT
PRINT "Or, just modify the code!"